#pragma once
#include "bp/bp_platform.h"

#define _BP_ERROR_DECLARE(description, code) BP_ERROR_##description = code
typedef enum bp_error {
	_BP_ERROR_DECLARE(OK, 0),
	_BP_ERROR_DECLARE(BUF_ALLOC_FAILED, 1),
	_BP_ERROR_DECLARE(INVALID_UTF8, 2),
};
typedef bp_uint32_t bp_error_t;

_BP_EXPORT bp_error_t _BP_API bp_get_lasterror();
_BP_EXPORT void _BP_API bp_set_lasterror(bp_error_t err);